import {API} from '../api/index.js'

/**
 * 注册-验证手机验证码
 * @param {*} param 
 */
const _checkValidate = function(param) {
    const url = "/mobile/user/checkValidate";
    const result = API.post(url,param);
    return result;
};


/**
 * 获取验证码 点击倒计时的那个~
 * @param {*} param 
 */
const _sendvalidatecode = function(param) {
    const url = "/Mobile/Api/send_validate_code";
    const result = API.post(url,param);
    return result;
};


/**
 * 设置密码（真·注册）
 * 
 */
const _ajaxregester=function(param){
    const url= "/mobile/user/ajaxregester";
    const result = API.post(url,param);
    return result;
}

/**
 * 找回密码
 * @param {*} param 
 */
const _ajaxforget=function(param){
    const url= "/mobile/user/ajaxforget";
    const result = API.post(url,param);
    return result;
}

/**
 * 修改密码
 * @param {*} param 
 */
const _ajaxeditpassword=function(param){
    const url= "/mobile/user/ajaxeditpassword";
    const result = API.post(url,param);
    return result;
}






/**
 * 获取用户信息
 * @param {*} param 
 */
const _ajaxindex=function(param){
    const url= "/mobile/user/getUserInformation";
    const result = API.post(url,param);
    return result;
}


/**
 * 获取用户消息
 * @param {*} param 
 */
const _getUserMessage=function(param){
    const url= "/mobile/user/getUserMessage";
    const result = API.post(url,param);
    return result;
}

/**
 * 获取消息详情
 * @param {*} param 
 */
const _getMessageInfo=function(param){
    const url= "/mobile/user/getMessageInfo";
    const result = API.post(url,param);
    return result;
}


/**
 * 编辑用户信息
 * @param {*} param 
 */
const _changeUserInfo=function(param){
    const url= "/mobile/user/changeUserInfo";
    const result = API.post(url,param);
    return result;
}



export {
    _checkValidate,
    _sendvalidatecode,
    _ajaxregester,
    _ajaxforget,
    _ajaxeditpassword,
    _ajaxindex,
    _getUserMessage,
    _changeUserInfo,
    _getMessageInfo
}